package com.zhongfl.crm.service.impl.boss;

import com.zhongfl.crm.lixiao.mapper.MessageNoticeMapper;
import com.zhongfl.crm.service.boss.MessageNoticeService;
import com.zhongfl.crm.model.boss.MessageNotice;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author 木叶丸
 * @date 2018/6/4
 */
@Service
public class MessageNoticeServiceImpl implements MessageNoticeService {

    @Resource
    private MessageNoticeMapper messageNoticeMapper;

    /**
     * 新增消息通知
     *
     * @param messageNotice 消息通知
     */
    @Override
    public void add(MessageNotice messageNotice) {
        messageNoticeMapper.insert(messageNotice);
    }

    /**
     * 更新读取状态
     *
     * @param messageNotice 更新条件
     */
    @Override
    public void updateStatus(MessageNotice messageNotice) {
        messageNoticeMapper.updateStatus(messageNotice);
    }

    /**
     * 条件查询列表信息
     *
     * @param notice 查询条件
     * @return 列表信息
     */
    @Override
    public List<MessageNotice> selectList(MessageNotice notice) {
        return messageNoticeMapper.selectList(notice);
    }
}
